Field of the Invention
The present disclosure relates to a technique for removing shade in a captured image.
Description of the Related Art
Mobile terminals, such as smartphones and tablet personal computers (PCs), having advanced information processing functions are becoming more and more popular nowadays. These mobile terminals have a camera and an image capture function. It is becoming increasingly common to capture an image of a document on a paper medium using such a camera function of a mobile terminal, and store image data of the captured image into a memory of the mobile terminal. Additionally, the combination of a mobile terminal and a printer is increasingly used to copy a document. For example, image data of a captured image is transmitted from the mobile terminal to the printer and the image is printed by the printer. If a user does not have a multifunction machine having a scanner function and a printer function, the user can copy a document using a mobile terminal and a printer in the above-described manner.
When a user captures an image of a document using a camera function of a mobile terminal, an object adjacent to the document or the user may cast shade on the document. If the user captures an image of the shaded document, the captured image may be shaded. Uneven brightness of the captured image caused by the shade will be referred to as “shade” hereinafter. The readability of the document in the shaded image is low. This leads to a reduction in quality of a printed image.
Japanese Patent Laid-Open No. 2012-95002 discloses a method for correcting shade in a document image captured with a camera. As described in Japanese Patent Laid-Open No. 2012-95002, shade components of the captured image are estimated, and the shade components are removed from the captured image based on information about the estimated shade components.
According to the method disclosed in Japanese Patent Laid-Open No. 2012-95002, however, if a document includes an object having a large area, estimated shade components will be affected by the object. This will result in a reduction in accuracy of shade estimation in the captured image. Specifically, the method disclosed in Japanese Patent Laid-Open No. 2012-95002 includes segmenting a captured image into a plurality of blocks, obtaining a color representative value of each of the blocks, and estimating shade based on the obtained values. A shade estimated value having a difference from those of neighboring blocks is replaced with a value obtained from the shade estimated values of the neighboring blocks. This method is advantageous when the size of an object is substantially equal to one block. If an object corresponds to multiple blocks, effects of the object cannot be eliminated in shade estimation.